son = 'ounkmaster.aif'

info = getSoundInfo(son)
setGlobalDuration(info[2] + 6)

playSound(sound=son, pitch=1, loop=False, amplitude=1, out=1)

example = 1

# convolution reverb
if example == 1:
    convolveReverb(input=1, impulse='ORTFFloorR10.wav', amplitude=3, mix=.1, buffersize=256)

# harmonisation
if example == 2:
    harmonizer(input=1, transpo=[-5,-2,3,7], mix=.8)

# resonator bank
if example == 3:
    resonator(input=1, pitch=[50,100,150,200,250], amplitude=.3)

# distortion
if example == 4:
    a = genLineseg([0,1,0,3,1,2,1])
    readTable(bus='drv', table=a)
    distortion(input=1, drive=.95, driveVar='drv')

# ring modulation
if example == 5:
    sine(pitch=[500,1000], amplitude=1, out=2)
    ringMod(in1=1, in2=2)

startCsound()
